package com.muyu.user.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.muyu.common.core.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import com.muyu.user.domain.req.SysUserCouponQueryReq;
import com.muyu.common.core.web.domain.BaseEntity;

/**
 * 用户优惠券记录数据库映射对象 sys_user_coupon
 *
 * @author liuguoqiang
 * @date 2025-09-18
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_user_coupon")
@EqualsAndHashCode(callSuper = true)
public class SysUserCoupon extends BaseEntity {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 优惠券名称
     */
    @Excel(name = "优惠券名称")
    private String couponName;

    /**
     * 面值
     */
    @Excel(name = "面值")
    private BigDecimal faceValue;

    /**
     * 最低消费额
     */
    @Excel(name = "最低消费额")
    private BigDecimal minAmount;

    /**
     * 有效期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;

    /**
     * 兑换/发放时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "兑换/发放时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date exchangeTime;

    /**
     * 0未使用 1已使用 2已过期
     */
    private Long status;

    /**
     * 备注
     */
    private String remark;


}
